\input ../../default-cn-cfg.mkvi
\setupcaption[table][location=top,suffix=\floatcaptionsuffix]

%%%
\definextable[generalxtable]
\setupxtable[generalxtable][
split=yes,header=repeat,footer=repeat,
% foregroundstyle=\rm\tfx,%设置正文字体 ,\setupframed参数
textwidth=10cm,option=stretch,align=middle,
]

\definextable[headrow][generalxtable]
\setupxtable[headrow][
foregroundcolor=red,
foregroundstyle=\ss\tfx,%设置正文字体 ,\setupframed参数
frame=off,topframe=on,rulethickness=0.7pt
]

\definextable[footrow][generalxtable]
\setupxtable[footrow]
[
foregroundcolor=blue,
foregroundstyle=\rm\fsx,%设置正文字体 ,\setupframed参数
frame=off,bottomframe=on,rulethickness=0.7pt
]

\definextable[firstrow][generalxtable]
\setupxtable[firstrow][
% foregroundcolor=blue,
foregroundstyle=\rm\tfx,%设置正文字体 ,\setupframed参数
frame=off,topframe=on,rulethickness=0.2pt
]

\definextable[bodyrow][generalxtable]
\setupxtable[bodyrow][
% foregroundcolor=blue,
foregroundstyle=\rm\tfx,%设置正文字体 ,\setupframed参数
frame=off,
]

%%%%

\starttext

\dorecurse{1}{ \input ../../hetangyuese/htys01.mkvi}

\startplacefloat[table][title=最简单表格,location={left}]

  \startxtable[generalxtable]
    \startxtablehead[headrow]
      \startxrow
        \startxcell  表头 1
        \stopxcell
        \startxcell  表头 2
        \stopxcell
        \startxcell  表头 3
        \stopxcell
        \startxcell  表头 4
        \stopxcell
      \stopxrow
    \stopxtablehead
    \startxtablefoot[footrow]
      \startxrow
        \startxcell  表脚 1
        \stopxcell
        \startxcell  表脚 2
        \stopxcell
        \startxcell  表脚 3
        \stopxcell
        \startxcell  表脚 4
        \stopxcell
      \stopxrow
    \stopxtablefoot
    \startxtablebody[bodyrow]
      \startxrow [firstrow]
        \startxcell  行\low{\recurselevel}格1
        \stopxcell
        \startxcell  行\low{\recurselevel}格2
        \stopxcell
        \startxcell  行\low{\recurselevel}格3
        \stopxcell
        \startxcell  行\low{\recurselevel}格4
        \stopxcell
      \stopxrow
      \dorecurse{10}{
      \startxrow
        \startxcell  行\low{\recurselevel}格1
        \stopxcell
        \startxcell  行\low{\recurselevel}格2
        \stopxcell
        \startxcell  行\low{\recurselevel}格3
        \stopxcell
        \startxcell  行\low{\recurselevel}格4
        \stopxcell
      \stopxrow
    }
    \stopxtablebody
  \stopxtable

\stopplacefloat

\dorecurse{2}{ \input ../../hetangyuese/htys01.mkvi}
\stoptext
